<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.6.2/css/bulma.min.css">
    <link rel="stylesheet" href="{{MEDIA_URL}}dist/app.css">
    <script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
  </head>
  <body>
  <section class="section">
    <div class="container">
        <div class="columns">
            <div class="column is-2">
                <div class="aside">
                
                    <h3 class="menu-label">Projects</h3>
                    
                    <hr>
                
                    <ul class="menu-list">
                        {%for p in projects %}
                            {% if p.tasks.count > 0 %}
                                <li> 
                                    <a {% if p.id == id|add:0 %} class="is-active" {%endif%} href="?id={{p.id}}">
                                    {{p.name}}
                                    </a>
                                </li>
                            {% endif %}
                        {% endfor %}
                    </ul>
                    <hr>
                    <h3 class="menu-label">Options</h3>
                    <ul class="menu-list">
                        <li>
                                <a target='_blank' href="/admin">admin</a>
                        </li>
                    </ul>
                </div>
            </div>  
            {% if tasks_count %}
            <div class="column is-10">
               

                <div class="tabs  is-centered is-toggle">
                    <ul>
                        <li  class="change">
                            <a onclick="change(this)">Day</a>
                        </li>
                        <li  class="change">
                            <a onclick="change(this)">Week</a>
                        </li>
                        <li  class="change">
                            <a onclick="change(this)">Month</a>
                        </li>
                    </ul>
                    <ul class="tabs is-small">
                   
                        <li class="">
                            <a  href="{% url 'admin:tasks_task_changelist' %}?project__id__exact={{id}}">
                                <span class="icon is-small"><i class="fas fa-edit" aria-hidden="true"></i></span>
                            Edit</a>
                        </li>
                    </ul>
                </div>
                  <div id="gantt" ></div>
            </div>
            {% endif %}
        </div>
   </div>
  </section>

  <script type="text/javascript">
      
       var tasks ={{tasks|safe}};

  </script>
<script defer src="{{MEDIA_URL}}dist/app.js"></script>
  </body>
</html>

